#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>
void* my_memcpy(void* dest, const void* src, size_t num)
{
	assert(dest && src);
	void* ret = dest;
	while (num--)
	{
		*(char*)dest = *(char*)src;
		dest = (char*)dest + 1;
		src = (char*)src + 1;
	}
	return ret;
}


int main()
{
	char arr[] = "abbcdef";
	char str[] = "bcd";
	my_memcpy(arr, str, sizeof(str) / sizeof(str[0]) - 1);
	printf("%s", arr);
	return 0;
}
#define _CRT_SECURE_NO_WARNINGS 1